package com.lfnyxy.eenum;

/**
 * Created by ted on 18/2/28.
 */
public enum SysUserType {

    SYS_USER(1, "系统用户"),
    CLIENT_USER(2, "公司用户"),
    SYS_ADMIN(9, "系统管理员"),
    UNKNOW(999,"未注册");

    SysUserType(int code, String content) {
        this.code = code;
        this.content = content;
    }

    private int code;
    private String content;

    public int getCode() {
        return code;
    }

    public String getContent() {
        return content;
    }

    public static SysUserType valueOf(int code){
        for(SysUserType item: values()){
            if(item.getCode() == code){
                return item;
            }
        }
        return SYS_USER;
    }

}
